package io.handlerstream;

import java.io.Serializable;

// 1. 如果一个类要写到外部必须要实现序列化接口，标记性接口
// 把一个对象序列化了先写： 对象的类信息，对象属性名，对象属性值
// 序列化：把对象的属性按照一定的顺序写到外部介质的过程
public class Person implements Serializable{
	private String name;
	private int age;
	// 当某个属性不想出国（序列化）
	private transient double money;
	
	public Person() {
		super();
	}
	public Person(String name, int age, double money) {
		super();
		this.name = name;
		this.age = age;
		this.money = money;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public double getMoney() {
		return money;
	}
	public void setMoney(double money) {
		this.money = money;
	}
	@Override
	public String toString() {
		return "Person [name=" + name + ", age=" + age + ", money=" + money + "]";
	}
}
